package chen.web.user.event;

import chen.web.event.Event;
import chen.web.user.Account;

public class OfflineEvent implements Event{

	private Account acc;
	private boolean autoOffline;
	
	public OfflineEvent(Account acc, boolean autoOffline){
		this.acc = acc;
		this.autoOffline = autoOffline;
	}
	
	/**
	 * 获取下线用户的帐号
	 * @return
	 */
	public Account getOfflineAccount(){
		return acc;
	}
	
	/**
	 * 是否自动下线. 返回值为true时,表示超过设定时间没有和服务器会话, 服务器单方面终止会话, 帐号自动下线.
	 * 否则表示用户主动下线.
	 * @return
	 */
	public boolean isAutoOffline(){
		return autoOffline;
	}
}
